From f33c8d775b9d206deb307cf6a11f38fcc73b9052 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 13 Jan 2010 20:23:14 +0000 Subject: [PATCH] * (bug 21738) Fix for r57119: OutputPage::setSyndicated() now works again (was breaking Special:RecentChanges' feeds, ...) --- includes/OutputPage.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b1ca97abd2..6498edc9bc 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -393,7 +393,13 @@ class OutputPage { public function disable() { $this->mDoNothing = true; } public function isDisabled() { return $this->mDoNothing; } - public function setSyndicated( $show = true ) { $this->mShowFeedLinks = $show; } + public function setSyndicated( $show = true ) { + if ( $show ) { + $this->setFeedAppendQuery( false ); + } else { + $this->mFeedLinks = array(); + } + } public function setFeedAppendQuery( $val ) { global $wgFeedClasses; @@ -401,7 +407,9 @@ class OutputPage { $this->mFeedLinks = array(); foreach( $wgFeedClasses as $type => $class ) { - $query = "feed=$type&".$val; + $query = "feed=$type"; + if ( is_string( $val ) ) + $query .= '&' . $val; $this->mFeedLinks[$type] = $this->getTitle()->getLocalURL( $query ); } } -- 2.20.1